package cn.funeralobjects.youtube.dl.extension.utils;

/**
 * @author FuneralObjects
 * Create date: 2020/4/10 3:01 PM
 */
public class CommonUtils {
    private static final Boolean IN_WINDOWS;
    private static final String WIN_NEW_LINE = "\r\n";
    private static final String DEFAULT_NEW_LINE = "\n";
    private static final String NEW_LINE;

    static {
        IN_WINDOWS = System.getProperty("os.name").toLowerCase().contains("win");
        NEW_LINE = IN_WINDOWS ? WIN_NEW_LINE : DEFAULT_NEW_LINE;
    }

    public static boolean inWindow() {
        return IN_WINDOWS;
    }

    public static String newLine() {
        return NEW_LINE;
    }
}
